package org.PISS.services;

import org.PISS.DAO.FitterDAO;
import org.PISS.DAO.ProductDAO;
import org.PISS.DAO.SupplierDAO;

/**
 * Created by admin on 27.12.13.
 */
public class DAOService {

    private static ProductDAO productDAO=null;
    private static SupplierDAO supplierDAO = null;
    private static FitterDAO fitterDAO=null;

    private static DAOService instance=null;

    public static synchronized DAOService getInstance(){
        if (instance == null){
            instance = new DAOService();
        }
        return instance;
    }

    public ProductDAO getProductDAO(){
        if (productDAO == null){
            productDAO = new ProductDAO();
        }
        return productDAO;
    }

    public SupplierDAO getSupplierDAO(){
        if (supplierDAO == null){
            supplierDAO = new SupplierDAO();
        }
        return supplierDAO;
    }

    public FitterDAO getFitterDAO(){
        if (fitterDAO == null){
            fitterDAO = new FitterDAO();
        }
        return fitterDAO;
    }

}
